<html>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<head>
  <meta charset="UTF-8">
  <title>js</title>
</head>
<body>
  
  <button onclick="tz()">停止</button>
  <div id="abc"></div>
</body>

<script>
  const begin = Date.parse(new Date());
  let siv = setInterval(()=>{
    let timestamp = Date.parse(new Date());
    document.querySelector("#abc").innerHTML = (timestamp - begin) / 1000 + "秒"
  }, 10)
  function tz() {
    clearInterval(siv)
  }
</script>

</html>